using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class AddShipper : System.Web.UI.Page
{
    ShipperDAO daoShipper = new ShipperDAO();
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void btnAdd_Click(object sender, EventArgs e)
    {
        Validate();
        if (IsValid)
        {
            ShipperInfo sh = new ShipperInfo();
            sh.CompanyName = txtCompanyName.Text;
            sh.Phone = txtPhone.Text;
            if (daoShipper.Insert(sh) > 0)
            {
                Response.Redirect("ShippersEx.aspx");
            }
            else lblMessage.Text = "Error";
        }
    }
}
